import http from "@/utils/http2.js";

export function queryByType(type) {
  return http.get("/dict/queryByType", { type });
}
export function queryTree(type) {
  return http.get("/dict/queryTree", { type: type, parentId: 0 });
}
export function queryTreeList(data) {
  return http.post("/dict/treeList", data);
}
export function queryList(data) {
  return http.post("/dict/query", data);
}
export function queryPName(pid) {
  return http.get("/dict/getPname", { pid });
}

export function saveDict(data) {
  return http.post("/dict/add", data);
}

export function updateDict(data) {
  return http.put("/dict/update", data);
}
export function deleteDict(id) {
  return http.delete("/dict/delete", { id });
}
